<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>

	<h:form>
    
    <br/>

    <t:tree2 id="serverTree" value="#{criterioTree.expandedTreeData}" var="node" varNodeToggler="t" clientSideToggle="false" binding="#{criterioTree.tree}" >
        <f:facet name="nodoEvaluacion">
            <h:panelGroup>
                <h:commandLink action="irAConfiguracionCriteriosEvaluacion" immediate="true" styleClass="#{t.nodeSelected ? 'documentSelected':'document'}" actionListener="#{configuracionCriterios.actionNodoItermedioSeleccionado}">
                    <t:graphicImage value="../estilo/imagenes/icono2.png" rendered="#{t.nodeExpanded}" border="0"/>
                    <t:graphicImage value="../estilo/imagenes/icono2.png" rendered="#{!t.nodeExpanded}" border="0"/>
                    <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
                    <h:outputText value=" (#{node.childCount})" styleClass="childCount" rendered="#{!empty node.children}"/>
                    <f:param id="nodoEvaluacion" name="nodoEvaluacion" value="#{node}"/>
                </h:commandLink>
            </h:panelGroup>
        </f:facet>
        <f:facet name="nodoRaiz">
            <h:panelGroup>
                
                <h:commandLink immediate="true" styleClass="#{t.nodeSelected ? 'documentSelected':'document'}" actionListener="#{configuracionCriterios.actionMostrarOpcionesRaiz}">
                    
                    <t:graphicImage value="../estilo/imagenes/icono2.png" rendered="#{t.nodeExpanded}" border="0"/>
                    
                    <t:graphicImage value="../estilo/imagenes/icono2.png" rendered="#{!t.nodeExpanded}" border="0"/>
                    
                    <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
                    <h:outputText value=" (#{node.childCount})" styleClass="childCount" rendered="#{!empty node.children}"/>
                    
                    <f:param id="nodoEvaluacionRaiz" name="nodoEvaluacionRaiz" value="#{node}"/>
                </h:commandLink>
               
            </h:panelGroup>
        </f:facet>
        <f:facet name="nodoCuantitativo">
            <h:panelGroup>
                <h:commandLink immediate="true" styleClass="#{t.nodeSelected ? 'documentSelected':'document'}">
                    <t:graphicImage value="../estilo/imagenes/document.png" border="0"/>
                    <h:outputText value="#{node.description}"/>
                    
                    <%-- 
                    <f:param id="nodoCuantitativo" name="nodoCuantitativo" value="#{node}"/>
                    --%>
                </h:commandLink>
            </h:panelGroup>
        </f:facet>
        <f:facet name="nodoHoja">
            <h:panelGroup>
                <h:commandLink immediate="true" styleClass="#{t.nodeSelected ? 'documentSelected':'document'}">
                    <t:graphicImage value="../estilo/imagenes/document.png" border="0"/>
                    <h:outputText value="#{node.description}"/>
                    <%--
                    <f:param id="direccion" name="direccion" value="#{node}"/>
                    --%>
                    
                </h:commandLink>
            </h:panelGroup>
        </f:facet>


        <f:facet name="person">
            <h:panelGroup>
                <t:graphicImage value="../estilo/imagenes/yellow-folder-open.png" rendered="#{t.nodeExpanded}" border="0"/>
                <t:graphicImage value="../estilo/imagenes/yellow-folder-closed.png" rendered="#{!t.nodeExpanded}" border="0"/>
                <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
            </h:panelGroup>
        </f:facet>
        <f:facet name="foo-folder">
            <h:panelGroup>
                <t:graphicImage value="../estilo/imagenes/yellow-folder-open.png" rendered="#{t.nodeExpanded}" border="0"/>
                <t:graphicImage value="../estilo/imagenes/yellow-folder-closed.png" rendered="#{!t.nodeExpanded}" border="0"/>
                <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
                <h:outputText value=" (#{node.childCount})" styleClass="childCount" rendered="#{!empty node.children}"/>
            </h:panelGroup>
        </f:facet>
        <f:facet name="bar-folder">
            <h:panelGroup>
                <t:graphicImage value="/images/blue-folder-open.gif" rendered="#{t.nodeExpanded}" border="0"/>
                <t:graphicImage value="/images/blue-folder-closed.png" rendered="#{!t.nodeExpanded}" border="0"/>
                <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
                <h:outputText value=" (#{node.childCount})" styleClass="childCount" rendered="#{!empty node.children}"/>
            </h:panelGroup>
        </f:facet>
        <f:facet name="document">
            <h:panelGroup>
                <h:commandLink immediate="true" styleClass="#{t.nodeSelected ? 'documentSelected':'document'}" actionListener="#{t.setNodeSelected}">
                    <t:graphicImage value="../estilo/imagenes/document.png" border="0"/>
                    <h:outputText value="#{node.description}"/>
                </h:commandLink>
            </h:panelGroup>
        </f:facet>
    </t:tree2>
    </h:form>